/** COPYRIGHT(C) 2008. Loc Phan. All Rights Reserved.
    A program that display effects of an earthquake
    @author Loc Phan
    @version 1.01 2008-12-1
*/

package edu.sjsu.cs.phan.gui;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class EarthquakeFrame
{
   public static void main(String[] args)
   {
      
      final String FRAME_TITLE = "Frame with a button";
      final int FRAME_WIDTH = 600;
      final int FRAME_HEIGHT = 100;


      JFrame frame = new JFrame();
      frame.setTitle(FRAME_TITLE);

      frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);

      frame.setLocationRelativeTo(null);
      
      JPanel panel = new JPanel();

      JLabel label1 = new JLabel("Magnitude:");
      panel.add(label1);

      JTextField textfield = new JTextField("0",5);
      panel.add(textfield);

      EarthquakeButton button = new EarthquakeButton(textfield);
      panel.add(button);
      
      JLabel label2 = new JLabel("");
      button.addLabel(label2);
      panel.add(label2);

      frame.add(panel);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
   }

}
